home *** CD-ROM | disk | FTP | other *** search
/ Star Trek Starfleet Academy Mini Omnipedia / MINI_OMNI.ISO / pc / omni_v2.dxr / 00371_Process Manager.ls < prev    next >
Encoding:
Text File  |  1996-04-15  |  2.9 KB  |  92 lines

  1. global gGlobalStepCount, gcurrentfullrecord, oIndexScroller, gTheFTword, gStatusField, gdescfield, gPreStyledFlag, gTickSND, gNewSetIsHereF, gchunksize, gFirstHotWord, gHotLinkList, gMACListenStatus, gKeyCount, gPrevWord, gkeylist, gModeState, gHopCounter, oTextScroller, oTextSlider, gScrollIncrK, gCurrEntryAttrib, gNopeSND, gholdTheFTword
  2.  
  3. on hProcess Pthesearchtext
  4.   hputmsg(RETURN & "Process begins for" && Pthesearchtext)
  5.   hTextEntryProcess(Pthesearchtext)
  6. end
  7.  
  8. on hTextEntryProcess Pthesearchtext
  9.   global gEditKeys
  10.   set gcurrentfullrecord to hParseAttrib(Pthesearchtext)
  11.   set the itemDelimiter to "@"
  12.   if (gcurrentfullrecord = EMPTY) or (gcurrentfullrecord = 0) then
  13.     hReportStatus("Sorry, unable to find that.")
  14.     hearit(gNopeSND)
  15.   else
  16.     hPrepStyles(gdescfield)
  17.     mHomeScrollFields(oTextScroller)
  18.     hPurgeMedia()
  19.     hPrepIndexList(item 1 of gcurrentfullrecord)
  20.     if gEditKeys then
  21.       hPrepEditMode()
  22.     end if
  23.     hDisplayEntryname(item 2 of gcurrentfullrecord)
  24.     delete item 1 of gcurrentfullrecord
  25.     delete item 1 of gcurrentfullrecord
  26.     hDisplayBodyText(gcurrentfullrecord)
  27.     mPrepScrollStats(oTextScroller)
  28.     hFetchMedia()
  29.     hSetFormat()
  30.     hReportStatus(" ")
  31.     hCaptureThisMoment()
  32.   end if
  33.   if gModeState = #FoundSet then
  34.     hFoundSetFeedback()
  35.   end if
  36.   hSysAlert(#LCARSREADY)
  37.   unLoad()
  38.   hRestoreLockWins()
  39.   set gMemoryAlertFlag to 1
  40.   hMemoryMonitor()
  41.   if line 1 of field gdescfield starts "‚Ä¢" then
  42.     hReportStatus("Displaying a user-written article.")
  43.   end if
  44. end
  45.  
  46. on hDetectKeyRoll wordnum, thefield
  47.   if wordnum = gPrevWord then
  48.     return 
  49.   end if
  50.   if wordnum > 0 then
  51.     set Lkeylistitem to getaProp(gHotLinkList, wordnum)
  52.     if not voidp(Lkeylistitem) then
  53.       set gchunksize to getAt(getAt(gkeylist, Lkeylistitem), 1)
  54.       set gFirstHotWord to getPropAt(gkeylist, Lkeylistitem)
  55.     else
  56.       set gFirstHotWord to 0
  57.     end if
  58.   end if
  59.   set gPrevWord to wordnum
  60. end
  61.  
  62. on hFoundSetFeedback
  63.   set Lnumofentries to mGetNdxLength(oIndexScroller)
  64.   if gNewSetIsHereF then
  65.     set Lphrase to " which were just added to the databank."
  66.   else
  67.     if mWhatFSlistType(oIndexScroller) = 1 then
  68.       if Lnumofentries = 1 then
  69.         set Lphrase to " which contains the word ‚Ä¢" & gTheFTword & "‚Ä¢."
  70.       else
  71.         set Lphrase to " which contain the word ‚Ä¢" & gTheFTword & "‚Ä¢."
  72.       end if
  73.     else
  74.       if mWhatFSlistType(oIndexScroller) = 0 then
  75.         set Lphrase to " related to the entry" && gTheFTword & "."
  76.       else
  77.         if mWhatFSlistType(oIndexScroller) = 3 then
  78.           set Lphrase to " containing a video clip."
  79.         else
  80.           set Lphrase to "."
  81.         end if
  82.       end if
  83.     end if
  84.   end if
  85.   hReportStatus("This is entry number" && gGlobalStepCount && "of" && mGetNdxLength(oIndexScroller) & Lphrase)
  86. end
  87.  
  88. on hReportStatus pWhat
  89.   set the text of cast gStatusField to string(pWhat)
  90.   hearit(gTickSND)
  91. end
  92.